package java6681.lesson06;

 class Student6681{
    private int age;
    private String name;

     public void setAge(int stuAge){
       if (stuAge <= 8) {
           System.out.println("对不起，您输入的年龄不合法");
       }else {
           age = stuAge;
       }
       }


     public int getAge(){
         return age;
     }

     public void setName(String stuName){
         name = stuName;
     }
     public String getName(){
        return name;
     }
     public void introduce(){
         System.out.println("大家好,我叫" + name + "，我今年" + age + "岁");
     }
 }


public class Example6681{
    public static void main(String[] args) {
        Student6681 stu = new Student6681();
        stu.setAge(-30);
        stu.setName("韩强");
        stu.introduce();
    }
}
